﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace TangGuo.UserControls
{
    /// <summary>
    /// PositionGuangHuan.xaml 的交互逻辑
    /// </summary>
    public partial class PositionGuangHuan : UserControl
    {
        private int Col;
        private int Row;
        public PositionGuangHuan()
        {
            InitializeComponent();
        }
        public void SetPosition(int x, int y)
        {
            Col = x;
            Row = y;
            double xd = (y % 2) == 0 ? x * 90.0 : 45.0 + x * 90.0;
            double yd = y * 77;
            SetValue(Canvas.LeftProperty, xd-40.0);
            SetValue(Canvas.TopProperty, yd-46.0);
        }
    }
}
